<div class="panel panel-default panel-intro">
    {:build_heading()}

    <div class="panel-body">
        <div id="myTabContent" class="tab-content">
            <div class="tab-pane fade active in" id="one">
                <div class="widget-body no-padding">
                    <div id="toolbar" class="toolbar">
                        {:build_toolbar('refresh')}
                    </div>
                    <div class="config-container">
                        <div class="config-header">
                            <h3><i class="fa fa-cog"></i> Scanwork系统配置</h3>
                            <p class="text-muted">管理系统域名、小程序配置等基础设置</p>
                        </div>
                        
                        <form id="config-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
                            <div class="config-list">
                                <!-- 配置项将通过JavaScript动态加载 -->
                            </div>
                            
                            <div class="form-group">
                                <div class="col-sm-offset-2 col-sm-10">
                                    <button type="submit" class="btn btn-success btn-lg">
                                        <i class="fa fa-save"></i> 保存配置
                                    </button>
                                    <button type="button" class="btn btn-default btn-lg" onclick="location.reload()">
                                        <i class="fa fa-refresh"></i> 重置
                                    </button>
                                </div>
                            </div>
                        </form>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

<style>
.config-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

.config-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.config-header h3 {
    color: #333;
    margin-bottom: 10px;
}

.config-list {
    margin-bottom: 30px;
}

.config-item {
    background: #f9f9f9;
    border: 1px solid #e5e5e5;
    border-radius: 5px;
    padding: 20px;
    margin-bottom: 15px;
    transition: all 0.3s ease;
}

.config-item:hover {
    border-color: #3498db;
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.1);
}

.config-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.config-item-title {
    font-size: 16px;
    font-weight: bold;
    color: #333;
    margin: 0;
}

.config-item-key {
    font-size: 12px;
    color: #666;
    background: #e9ecef;
    padding: 2px 8px;
    border-radius: 3px;
}

.config-item-description {
    color: #666;
    font-size: 14px;
    margin-bottom: 15px;
    line-height: 1.5;
}

.form-group {
    margin-bottom: 15px;
}

.form-control {
    border-radius: 4px;
    border: 1px solid #ddd;
    padding: 8px 12px;
    font-size: 14px;
}

.form-control:focus {
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

.btn-lg {
    padding: 10px 30px;
    font-size: 16px;
    margin-right: 10px;
}

.help-block {
    font-size: 12px;
    color: #999;
    margin-top: 5px;
}

.status-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: bold;
}

.status-normal {
    background: #d4edda;
    color: #155724;
}

.status-hidden {
    background: #f8d7da;
    color: #721c24;
}

.config-section {
    margin-bottom: 30px;
}

.section-title {
    font-size: 18px;
    font-weight: bold;
    color: #333;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #007bff;
}

.switch-container {
    margin-top: 5px;
}

.switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: #2196F3;
}

input:checked + .slider:before {
    transform: translateX(26px);
}
</style>